<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>预警中心 - LabEnergyInsight</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body class="bg-gray-50">
    <!-- Header -->
    <div class="bg-white p-4 shadow-sm">
        <div class="flex justify-between items-center">
            <h1 class="text-xl font-semibold">预警中心</h1>
            <div class="flex items-center space-x-2">
                <button class="p-2">
                    <i class="fas fa-ellipsis-v text-gray-500"></i>
                </button>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="p-4 space-y-4">
        <!-- Alert Statistics -->
        <div class="grid grid-cols-3 gap-4">
            <div class="bg-white rounded-xl p-4 shadow-sm text-center">
                <div class="text-2xl font-bold text-red-500">3</div>
                <div class="text-sm text-gray-500 mt-1">紧急</div>
            </div>
            <div class="bg-white rounded-xl p-4 shadow-sm text-center">
                <div class="text-2xl font-bold text-yellow-500">5</div>
                <div class="text-sm text-gray-500 mt-1">警告</div>
            </div>
            <div class="bg-white rounded-xl p-4 shadow-sm text-center">
                <div class="text-2xl font-bold text-blue-500">12</div>
                <div class="text-sm text-gray-500 mt-1">提示</div>
            </div>
        </div>

        <!-- Alert Rules -->
        <div class="bg-white rounded-xl p-4 shadow-sm">
            <div class="flex justify-between items-center mb-4">
                <h2 class="font-semibold">预警规则</h2>
                <button class="text-sm text-blue-500">
                    <i class="fas fa-plus mr-1"></i> 添加规则
                </button>
            </div>
            <div class="space-y-3">
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-red-50 p-2 rounded-lg">
                            <i class="fas fa-bolt text-red-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">能耗突增</p>
                            <p class="text-xs text-gray-500">超过基准值20%</p>
                        </div>
                    </div>
                    <div class="flex items-center space-x-2">
                        <span class="text-xs px-2 py-1 bg-red-100 text-red-500 rounded">启用</span>
                        <i class="fas fa-chevron-right text-gray-400"></i>
                    </div>
                </div>
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-yellow-50 p-2 rounded-lg">
                            <i class="fas fa-wind text-yellow-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">风量异常</p>
                            <p class="text-xs text-gray-500">低于设定值15%</p>
                        </div>
                    </div>
                    <div class="flex items-center space-x-2">
                        <span class="text-xs px-2 py-1 bg-yellow-100 text-yellow-500 rounded">启用</span>
                        <i class="fas fa-chevron-right text-gray-400"></i>
                    </div>
                </div>
            </div>
        </div>

        <!-- Recent Alerts -->
        <div class="bg-white rounded-xl p-4 shadow-sm">
            <div class="flex justify-between items-center mb-4">
                <h2 class="font-semibold">最近预警</h2>
                <button class="text-sm text-blue-500">查看全部</button>
            </div>
            <div class="space-y-3">
                <div class="flex items-center justify-between p-3 bg-red-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-red-100 p-2 rounded-lg">
                            <i class="fas fa-exclamation-triangle text-red-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">CO₂浓度超标</p>
                            <p class="text-xs text-red-500">2024-03-15 15:30</p>
                        </div>
                    </div>
                    <div class="text-red-500">
                        <i class="fas fa-chevron-right"></i>
                    </div>
                </div>
                <div class="flex items-center justify-between p-3 bg-yellow-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-yellow-100 p-2 rounded-lg">
                            <i class="fas fa-temperature-high text-yellow-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">温度异常</p>
                            <p class="text-xs text-yellow-500">2024-03-15 14:20</p>
                        </div>
                    </div>
                    <div class="text-yellow-500">
                        <i class="fas fa-chevron-right"></i>
                    </div>
                </div>
                <div class="flex items-center justify-between p-3 bg-blue-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-blue-100 p-2 rounded-lg">
                            <i class="fas fa-info-circle text-blue-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">设备维护提醒</p>
                            <p class="text-xs text-blue-500">2024-03-15 13:15</p>
                        </div>
                    </div>
                    <div class="text-blue-500">
                        <i class="fas fa-chevron-right"></i>
                    </div>
                </div>
            </div>
        </div>

        <!-- Alert Actions -->
        <div class="bg-white rounded-xl p-4 shadow-sm">
            <h2 class="font-semibold mb-4">预警动作</h2>
            <div class="space-y-3">
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-green-50 p-2 rounded-lg">
                            <i class="fas fa-bell text-green-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">短信通知</p>
                            <p class="text-xs text-gray-500">发送至运维人员</p>
                        </div>
                    </div>
                    <div class="relative inline-block w-12 h-6">
                        <input type="checkbox" class="sr-only" checked>
                        <div class="block bg-green-500 w-12 h-6 rounded-full"></div>
                        <div class="dot absolute left-7 top-1 bg-white w-4 h-4 rounded-full transition"></div>
                    </div>
                </div>
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
                    <div class="flex items-center space-x-3">
                        <div class="bg-green-50 p-2 rounded-lg">
                            <i class="fas fa-wind text-green-500"></i>
                        </div>
                        <div>
                            <p class="font-medium">自动调节风量</p>
                            <p class="text-xs text-gray-500">根据CO₂浓度</p>
                        </div>
                    </div>
                    <div class="relative inline-block w-12 h-6">
                        <input type="checkbox" class="sr-only" checked>
                        <div class="block bg-green-500 w-12 h-6 rounded-full"></div>
                        <div class="dot absolute left-7 top-1 bg-white w-4 h-4 rounded-full transition"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html> 